package com.qf.mapper;

import com.qf.pojo.Authors;
import com.qf.pojo.Books;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface AuthorsMapper {

    @Select("select * from authors")
    List<Authors> findAll();

    @Select("select * from authors where authorid=#{id}")
    Authors find(Long id);


    List<Authors> findAllByName(@Param("authorname") String authorname );

    void updateAuthors(Authors authors);

    @Insert("insert into authors value(null,#{authorname},#{authordescription},#{datastatus})")
    void addAuthors(Authors authors);




}
